#define _CRT_SECURE_NO_WARNINGS 1
#include"Stack.h"
#include"Queue.h"

void test02()
{	
	Queue q;
	QueueInit(&q);

	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);

	//printf("%d ", QueueFront(&q));
	//QueuePop(&q);
	//printf("%d ", QueueFront(&q));
	//QueuePop(&q);
	//printf("%d ", QueueFront(&q));
	//QueuePop(&q);

	//printf("%d ", QueueBack(&q));
	//QueuePop(&q);

	printf("%d\n", QueueSize(&q));

	while (!QueueEmpty(&q))
	{
		printf("%d ", QueueFront(&q));
		QueuePop(&q);
	}

	QueueDestroy(&q);
}

void test01()
{
	stack st;
	StackInit(&st);

	StackPush(&st, 1);
	StackPush(&st, 2);
	printf("%d ", StackTop(&st));
	StackPop(&st);
	StackPush(&st, 3);
	StackPush(&st, 4);
	printf("%d ", StackTop(&st));
	StackPop(&st);
	StackPush(&st, 5);


	while (!StEmpty(&st))
	{
		printf("%d ", StackTop(&st));
		StackPop(&st);
	}

	StackDestroy(&st);
}



int main()
{
	//test01();
	test02();
	return 0;
}